﻿namespace DoNet.Platform.Wechat.Model
{
    public class UserInfo
    {
        /*
        {
           "openid":" OPENID",
           " nickname": NICKNAME,
           "sex":"1",
           "province":"PROVINCE"
           "city":"CITY",
           "country":"COUNTRY",
           "headimgurl":    "http://wx.qlogo.cn/mmopen/g3MonUZtNHkdmzicIlibx6iaFqAc56vxLSUfpb6n5WKSYVY0ChQKkiaJSgQ1dZuTOgvLLrhJbERQQ4eMsv84eavHiaiceqxibJxCfHe/46", 
           "privilege":["PRIVILEGE1","PRIVILEGE2"],
           "unionid": "o6_bmasdasdsad6_2sgVt7hMZOPfL"
        }
        */
        /// <summary>
        /// 用户的唯一标识
        /// </summary>
        public string openid { set; get; } = string.Empty;
        /// <summary>
        /// 用户昵称
        /// </summary>
        public string nickname { set; get; } = string.Empty;
        /// <summary>
        /// 用户的性别，值为1时是男性，值为2时是女性，值为0时是未知
        /// </summary>
        public string sex { set; get; } = string.Empty;
        /// <summary>
        /// 用户个人资料填写的省份
        /// </summary>
        public string province { set; get; } = string.Empty;
        /// <summary>
        /// 普通用户个人资料填写的城市
        /// </summary>
        public string city { set; get; } = string.Empty;
        /// <summary>
        /// 国家，如中国为CN
        /// </summary>
        public string country { set; get; } = string.Empty;
        /// <summary>
        /// 用户头像，最后一个数值代表正方形头像大小（有0、46、64、96、132数值可选，0代表640*640正方形头像），用户没有头像时该项为空。若用户更换头像，原有头像URL将失效。
        /// </summary>
        public string headimgurl { set; get; } = string.Empty;
        /// <summary>
        /// 用户特权信息，json 数组，如微信沃卡用户为（chinaunicom）
        /// </summary>
        public string[] privilege { set; get; } = new string[0];
        /// <summary>
        /// 只有在用户将公众号绑定到微信开放平台帐号后，才会出现该字段。详见：获取用户个人信息（UnionID机制）
        /// </summary>
        public string unionid { set; get; } = string.Empty;
    }
}
